<?php
	class Goods
	{
		public $name;
		public $prize;
		public $stock;
		function __construct($a,$b,$c)
		{
			$this->name = $a;
			$this->prize = $b;
			$this->stock = $c;
		}
		public function output()
		{
			$this->stock -= 1;//卖出了库存就-1！//
			echo "现在库存为:".$this->stock;
		}
		public function input()
		{
			$this->stock += 1;//入库了库存就+1！！
			echo "现在库存为:".$this->stock;
		}
	}
	class Shoes extends Goods
	{

		protected $discount_prize;
		protected $discount_rate;
				function __construct($a,$b,$c,$d,$e)
		{
			$this->name = $a;
			$this->prize = $b;
			$this->stock = $c;
			$this->discount_prize = $d;
			$this->discount_rate = $e;
		}
	}
	//分隔符分隔符
    class Fun
	{
		function fun1()
		{
			echo "fun1"."<br>";
		}
		function fun2()
		{
			echo "fun2"."<br>";
		}
		function fun3()
		{
			echo "fun3"."<br>";
		}
		function fun4()
		{
			echo "fun4"."<br>";
		}
	}
	class MyFun extends Fun
	{
		function fun1()
		{
			echo "变了的fun1"."<br>";
		}
		function fun2()
		{
			echo "fun2"."<br>";
			echo"增加"."<br>";
		}
		function fun3()
		{
			//屏蔽
		}
		function fun4()
		{
			echo "fun4"."<br>";
		}
	}
	//我是分隔符--------------------------------------------
	interface Shape//shape接口
	{
		function area(); //面积	
		function volume();//体积
		function output_the_shape();//输出形状
	}
	class point implements Shape
	{
		private $x;
		private $y;
		function __construct($a,$b)
		{
			$this ->x = $a;
			$this ->y = $b;
		}
		function area()
		{
			echo "0";
		}
		function volume()
		{
			echo "0";
		}
		function output_the_shape()
		{
			echo "The shape is a Point.";
		}
	}
	//我是分隔符--------------------------------------------
	class Circle extends point implements Shape
	{
		private $r;
		function __construct($a)
		{
			$this ->r = $a;
		}
		function area()
		{
			echo (3.14*$this->r*$this->r);
		}
		function volume()
		{
			echo (4/3)*3.14*$this->r*$this->r*$this->r;
		}
		function output_the_shape()
		{
			echo "The shape is a Circle.";
		}
	}
	//我也是分隔符哟~~~~~~~~~~~~~~~~~~~~
	class Cylinder extends Circle implements Shape
	{
		private $r;
		private $h;
		function __construct($a,$b)
		{
			$this ->r = $a;
			$this ->h = $b;
		}
		function area()
		{
			echo (3.14*$this->r*$this->r);
		}
		function volume()
		{
			echo 3.14*$this->r*$this->r*$this->h;
		}
		function output_the_shape()
		{
			echo "The shape is a Cycliner.";
		}
	}
	//我也是分隔符嗷嗷嗷嗷
?>
